<template>
  <div class="ake_loading" v-show="isLoading">
    <div class="ake_mask"></div>
    <div class="loadingToast_bd">
      <div class="loader"></div>
    </div>
  </div>
</template>

<script>
import { mapGetters } from 'vuex';

export default {
  computed: {
    ...mapGetters({
      isLoading: 'getIsLoading'
    })
  }
};
</script>

<style scoped>
.ake_mask {
  position: fixed;
  z-index: 3000;
  width: 100%;
  height: 100%;
  top: 0;
  left: 0;
  background-color: rgba(0, 0, 0, 0.5);
  transition: all 0.3s ease-in-out 0;
}
.loadingToast_bd {
  position: fixed;
  z-index: 3010;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
}
.loader {
  border-top: 5px solid rgba(0, 0, 0, 0.3);
  border-right: 5px solid rgba(0, 0, 0, 0.3);
  border-bottom: 5px solid rgba(0, 0, 0, 0.3);
  border-left: 5px solid #ffffff;
  -webkit-animation: load8 0.8s infinite linear;
  animation: load8 0.8s infinite linear;
}

.loader,
.loader:after {
  border-radius: 50%;
  width: 50px;
  height: 50px;
}

@-webkit-keyframes load8 {
  0% {
    -webkit-transform: rotate(0deg);
    transform: rotate(0deg);
  }

  50% {
    -webkit-transform: rotate(180deg);
    transform: rotate(180deg);
  }

  100% {
    -webkit-transform: rotate(360deg);
    transform: rotate(360deg);
  }
}

@keyframes load8 {
  0% {
    -webkit-transform: rotate(0deg);
    transform: rotate(0deg);
  }

  50% {
    -webkit-transform: rotate(180deg);
    transform: rotate(180deg);
  }

  100% {
    -webkit-transform: rotate(360deg);
    transform: rotate(360deg);
  }
}
</style>
